<template>
<div>
    <el-button type="deleteAll" @click="deleteAllVisible = true">批量删除</el-button>
    <el-dialog width="432px" title="删除提示" :visible.sync="deleteAllVisible">
        <i>
            <img src="@/assets/image/Shape.png" alt />
        </i>
        <span>{{title}}</span>
        <span slot="footer" class="dialog-footer">
            <el-button type="primary" @click="removeAll">确 定</el-button>
            <el-button type="cancel" @click="deleteAllVisible = false">取 消</el-button>
        </span>
    </el-dialog>
</div>
</template>

<script>
export default {
    props: ["title", "clearAll"],
    data() {
        return {
            deleteAllVisible: false,
            ids: [],
        };
    },
    methods: {
        removeAll() {
            this.clearAll();
            this.deleteAllVisible = false
        },
    },
};
</script>

<style lang="less" scoped>
/deep/.el-button--deleteAll {
    border: 1px solid rgba(251, 54, 63, 1);
    color: #fb363f;
    width: 80px;
    height: 36px;
    background: rgba(255, 255, 255, 1);
    border-radius: 3px;
    padding: 0;
    font-size: 14px;
}

/deep/.el-dialog {
    margin-top: 19% !important;
    box-shadow: 0px 4px 12px 0px rgba(0, 0, 0, 0.15);
    border-radius: 4px;

    >.el-dialog__header {
        padding-left: 70px;
        padding-bottom: 0;

        >span {
            font-size: 16px;
            font-family: PingFangSC-Medium, PingFang SC;
            font-weight: 500;
            color: rgba(0, 0, 0, 0.85);
            line-height: 24px;
        }
    }

    >.el-dialog__body {
        padding-left: 70px;
        padding-top: 12px;
        padding-bottom: 24px;
        position: relative;

        >i {
            position: absolute;
            left: 32px;
            top: -22px;
        }

        >span {
            font-size: 14px;
            font-family: PingFangSC-Regular, PingFang SC;
            font-weight: 400;
            color: rgba(102, 102, 102, 1);
        }
    }

    >.el-dialog__footer {
        .el-button--primary {
            width: 65px;
            height: 32px;
            background: rgba(22, 119, 255, 1);
            padding: 0;
            color: white;
        }

        .el-button--cancel {
            width: 65px;
            height: 32px;
            background: rgba(250, 250, 250, 1);
            border: 1px solid rgba(221, 221, 221, 1);
            font-size: 14px;
            font-family: PingFangSC-Regular, PingFang SC;
            font-weight: 400;
            color: rgba(102, 102, 102, 1);
            padding: 0;
            margin-left: 8px;
        }
    }
}
</style>
